package net.qhzw.vip.qiyu.domain.dto;

import lombok.Getter;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;

import java.util.Collection;


public class LoginResultUserDto extends User {

    /**
     * 用户id
     */
    @Getter
    private Long userId;

    /**
     * 商铺ID
     */
    @Getter
    private Long shopId;

    /**
     * 1、系统管理员；2、站点管理员；3、微信用户
     */
    @Getter
    private Byte userType;


    public LoginResultUserDto(Long userId, Long shopId, Byte userType, String username, String password, boolean enabled, boolean accountNonExpired, boolean credentialsNonExpired, boolean accountNonLocked, Collection<? extends GrantedAuthority> authorities) {
        super(username, password, enabled, accountNonExpired, credentialsNonExpired, accountNonLocked, authorities);
        this.userId = userId;
        this.shopId = shopId;
        this.userType = userType;
    }

}
